package com.fh.service.system.company;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.fh.dao.DaoSupport;
import com.fh.entity.Page;

import com.fh.util.PageData;


@Service("companyService")
public class CompanyService {

	@Resource(name = "daoSupport")
	private DaoSupport dao;
	
	//======================================================================================
	
	/*
	* 通过id获取数据
	*/
	public PageData findCompanyById(PageData pd)throws Exception{
		return (PageData)dao.findForObject("CompanyMapper.findCompanyById", pd);
	}
	
	
	
	/*
	* 保存
	*/
	public void saveCompany(PageData pd)throws Exception{
		dao.save("CompanyMapper.saveCompany", pd);
	}
	/*
	* 修改
	*/
	public void editCompany(PageData pd)throws Exception{
		dao.update("CompanyMapper.editCompany", pd);
	}
	/*
	* 删除
	*/
	public void deleteCompany(PageData pd)throws Exception{
		dao.delete("CompanyMapper.deleteCompany", pd);
	}
	/*
	* 批量删除
	
	public void deleteAllCompany(String[] USER_IDS)throws Exception{
		dao.delete("CompanyMapper.deleteAllCompany", USER_IDS);
	}*/
	/*
	*列表(全部)
	*/
	public List<PageData> listAllCompany(Page page)throws Exception{
		return (List<PageData>) dao.findForList("CompanyMapper.listAllCompany", page);
	}
	
	
	
	
}

